<template>
  <div class="dateils">
    <!--旅客信息开始-->
    <div>
      <dateils-title title="旅客信息"/>
      <dateils-info :passenerInfo="myselfData"/>
    </div>
    <!--旅客信息结束-->

    <!--航班信息开始-->
    <div>
      <dateils-title title="航班信息"/>
      <details-flight :flightData="flightData"/>
    </div>
    <!--航班信息结束-->

    <!--事后领取进度开始-->
    <div>
      <dateils-title title="事后领取进度" :isState="true" :state="stateMsg"/>
      <details-after :stateData="myselfState"/>
    </div>
    <!--事后领取进度结束-->

    <!--其他旅客查询开始-->
    <details-btn name="其他旅客查询" :isDateils="true" @handleClick="routerPsuh"/>
    <!--其他旅客查询结束-->
  </div>
</template>

<script>
import dateilsTitle from 'components/inquiry-title/inquiry-title-h1'
import dateilsInfo from 'components/inquiry-passener/inquiry-info'
import detailsFlight from 'components/inquiry-flight/inquiry-flight-info'
import detailsAfter from 'components/inquiry-after/inquiry-after-schedule'
import detailsBtn from 'components/inquiry-btn/inquiry-btn'
export default {
  components: {
    dateilsTitle,
    dateilsInfo,
    detailsFlight,
    detailsAfter,
    detailsBtn
  },
  data () {
    return {
      flightData: {}, // 航班信息状态
      myselfData: {}, // 旅客信息状态
      myselfState: {}, // 支付的状态
      stateMsg: ''
    }
  },
  methods: {
    routerPsuh () {
      this.$router.push('/other')
    },
    getMyselfInfo () {
      console.log(JSON.parse(sessionStorage.getItem('myInfoData')))
      let myInfo = JSON.parse(sessionStorage.getItem('myInfoData'))
      this.flightData = {
        'flightNo': myInfo.flightNo,
        'flightLine': myInfo.flightLine,
        'lclDptDate': myInfo.lclDptDate
      }
      this.myselfData = {
        'paxName': myInfo.paxName,
        'idNo': myInfo.idNo
      }
      this.myselfState = {
        'state': myInfo.state,
        'auditDate': myInfo.auditDate,
        'auditReasons': myInfo.auditReasons
      }
      console.log(21321)
      this.stateMsg = myInfo.state
    }
  },
  created () {
    document.title = '领取记录详情'
  },
  mounted () {
    this.getMyselfInfo()
    console.log(this.myselfState)
  }
}
</script>

<style lang="scss" scoped>
@import '~assets/scss/public/var.scss';
.dateils {
  background: $colorWhite1;
  height: calc(100%);
}
</style>
